package com.qingcloud.fexecutor.model;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import javax.persistence.*;
import java.io.Serializable;

/**
 * <p>
 * API参数
 * </p>
 *
 * @author wangjinnan
 * @since 2021-05-10
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@Table(name = "df_api_parameter")
public class ApiParameter implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 自增主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    /**
     * 所属API ID
     */
    private Integer apiId;

    /**
     * 前端JSON节点ID
     */
    private String nodeId;

    /**
     * 前端JSON节点父ID
     */
    private String parentNodeId;

    /**
     * 参数名称
     */
    @Column(name = "`key`")
    private String key;

    /**
     * 类型 1-header 2-body 3-query
     */
    private Integer type;

    /**
     * 参数说明
     */
    @Column(name = "`comment`")
    private String comment;

    /**
     * 是否必填 0不 1是
     */
    private Integer requiredFlag;

    /**
     * JSON参数根类型 1-对象 2-数组
     */
    private Integer rootType;

    /**
     * 值类型 sys_dict字典表
     */
    private Integer valueType;

    /**
     *
     */
    private String defaultValue;



}
